Thread-Safe & Lock-Free Structures
A single-threaded queue is a solved problem. Most candidates can write one half-asleep. Add threads and the floor tilts. That same push and pop, now racing on four or sixty-four cores, can shred the structure in ways that never reproduce on your laptop and surface once a month in a data center. This is the round where senior candidates pull away from the field. Anyone can wrap the whole thing in a lock. What the interviewer is listening for is whether you know what that lock is protecting you against, what it actually costs to hold, and what you reach for when that cost gets too high.
The bar has a name: correct under threads. "Ran on my machine" and "passed the test" don't count. A concurrent structure is correct only if every possible interleaving of every thread leaves it in a valid state, and there are a staggering number of interleavings. The whole discipline is learning to reason about the worst one instead of the lucky one. Watch how the round tends to escalate. It often opens with "make this queue thread-safe," and you reach for a mutex. Then the pressure arrives: now make it faster, now do it without a lock, now tell me the memory ordering, now what frees the node.
IntelPremium lesson · System design round
The Intel design, worked end to end.
- The design, drawn outSystem design · 1 diagram
- 4 deep divesWith the tradeoffs
$49 a year · all 100 companies · cancel anytime
From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.
Intel interview guideKnow what Intel asks before you walk in.
12 coding · 3 system design · 13 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.